package com.ruoyi.merchant.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.merchant.mapper.MerchantFinancialFlowMapper;
import com.ruoyi.merchant.domain.MerchantFinancialFlow;
import com.ruoyi.merchant.service.IMerchantFinancialFlowService;

/**
 * 商家收支明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-23
 */
@Service
public class MerchantFinancialFlowServiceImpl implements IMerchantFinancialFlowService 
{
    @Autowired
    private MerchantFinancialFlowMapper merchantFinancialFlowMapper;

    /**
     * 查询商家收支明细
     * 
     * @param flowId 商家收支明细主键
     * @return 商家收支明细
     */
    @Override
    public MerchantFinancialFlow selectMerchantFinancialFlowByFlowId(String flowId)
    {
        return merchantFinancialFlowMapper.selectMerchantFinancialFlowByFlowId(flowId);
    }

    /**
     * 查询商家收支明细列表
     * 
     * @param merchantFinancialFlow 商家收支明细
     * @return 商家收支明细
     */
    @Override
    public List<MerchantFinancialFlow> selectMerchantFinancialFlowList(MerchantFinancialFlow merchantFinancialFlow)
    {
        return merchantFinancialFlowMapper.selectMerchantFinancialFlowList(merchantFinancialFlow);
    }

    /**
     * 新增商家收支明细
     * 
     * @param merchantFinancialFlow 商家收支明细
     * @return 结果
     */
    @Override
    public int insertMerchantFinancialFlow(MerchantFinancialFlow merchantFinancialFlow)
    {
        return merchantFinancialFlowMapper.insertMerchantFinancialFlow(merchantFinancialFlow);
    }

    /**
     * 修改商家收支明细
     * 
     * @param merchantFinancialFlow 商家收支明细
     * @return 结果
     */
    @Override
    public int updateMerchantFinancialFlow(MerchantFinancialFlow merchantFinancialFlow)
    {
        return merchantFinancialFlowMapper.updateMerchantFinancialFlow(merchantFinancialFlow);
    }

    /**
     * 批量删除商家收支明细
     * 
     * @param flowIds 需要删除的商家收支明细主键
     * @return 结果
     */
    @Override
    public int deleteMerchantFinancialFlowByFlowIds(String[] flowIds)
    {
        return merchantFinancialFlowMapper.deleteMerchantFinancialFlowByFlowIds(flowIds);
    }

    /**
     * 删除商家收支明细信息
     * 
     * @param flowId 商家收支明细主键
     * @return 结果
     */
    @Override
    public int deleteMerchantFinancialFlowByFlowId(String flowId)
    {
        return merchantFinancialFlowMapper.deleteMerchantFinancialFlowByFlowId(flowId);
    }
}
